<?php 

/**
 * Classe responsavel pelas buscas do site.
 * @package App.controller
 * @author Eric Haendel <erickhaendel@gmail.com>
 */
Class SearchController extends AppController {
	//Models a serem usados para a busca
	public $uses = array("User","Topic","Community");

	public function index($query = null)
	{
		if($_GET){
			$query = $_GET['q'];
		}
		$this -> layout = 'feed';
		$this->set('communities', $this -> Community -> searchCommunities($query));
	}
}


 ?>